from ckeditor_uploader.fields import RichTextUploadingField
from django.db import models
from article.models import DateTimeModel, BaseModel


# Create your models here.
class Brand(DateTimeModel):
    name = models.CharField(max_length=255)
    logo = models.ImageField(upload_to='logo')
    description = RichTextUploadingField(blank=True)

    def __str__(self):
        return self.name


class Shizhi(BaseModel):
    name = models.CharField(max_length=255)
    price = models.DecimalField(max_digits=6, decimal_places=6)
    shiyong = RichTextUploadingField(blank=True)

    def __str__(self):
        return self.name
